def isPalindrome(s: String): Boolean = {
    val sFilter = s.filter(x => x.isLetterOrDigit).map(x => x.toLower)
    if(sFilter.isEmpty) 
    true
    else 
    (for (x <- 0 to sFilter.length/2) yield (sFilter(x) == sFilter(sFilter.length - x - 1))).reduceLeft((acc,n)=> acc && n)
  }
println(isPalindrome("abc")) //false
println(isPalindrome("racecar")) // true
